package de.dhbw.karlsruhe.picsim.model;

import de.dhbw.karlsruhe.picsim.model.cpu.Processor;
import de.dhbw.karlsruhe.picsim.model.timer.Counter;
import de.dhbw.karlsruhe.picsim.model.timer.TimerFacade;
import de.dhbw.karlsruhe.picsim.rs232.ProtocolLogic;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: May 1, 2010
 * Time: 4:55:24 PM
 */
public class PicTime {
    private final Processor processor;
    private final TimerFacade timer;
    private final Counter counter;
    private final ProtocolLogic rs232;

    public PicTime(final Processor processor, final TimerFacade timer, final Counter counter, ProtocolLogic rs232) {
        this.processor = processor;
        this.timer = timer;
        this.counter = counter;
        this.rs232 = rs232;
    }

    public void circleModel() {
        processor.circle();
        timer.circle();
        counter.circle();
        rs232.sendMessageIfNecessary();
    }
}
